//   Copyright 2012,2013 Vaughn Vernon
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

package com.saasovation.agilepm.domain.model.team;

import java.util.Collection;

import com.saasovation.agilepm.domain.model.tenant.TenantId;

/**
 * 团队存储库
 * @author learn
 */
public interface TeamRepository {
    /**
     * 租户的所有团队清单
     * @param aTenantId                         租户ID
     * @return                                  返回集合
     */
    public Collection<Team> allTeamsOfTenant(TenantId aTenantId);
    /**
     * 移除（团队成员）
     * @param aTeam                             团队
     */
    public void remove(Team aTeam);
    /**
     * 移除所有（团队清单）
     * @param aTeamCollection                   团队清单
     */
    public void removeAll(Collection<Team> aTeamCollection);
    /**
     * 保存（团队）
     * @param aTeam                             团队
     */
    public void save(Team aTeam);
    /**
     * 保存所有（团队清单）
     * @param aTeamCollection                   团队清单
     */
    public void saveAll(Collection<Team> aTeamCollection);

    /**
     * 团队命名
     * @param aTenantId                         租户ID
     * @param aName                             名字
     * @return                                  返回团队
     */
    public Team teamNamed(TenantId aTenantId, String aName);
}
